package com.erp.print;

import com.erp.print.view.PrintFrame;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.swing.*;
import java.awt.*;

@SpringBootApplication
public class PrintApplication {
    private static PrintFrame printFrame;

    public static void main(String[] args) {

        SpringApplication.run(PrintApplication.class, args);

//        SpringApplicationBuilder builder = new SpringApplicationBuilder(PrintFrame.class);
//        builder.headless(false).run(args);
        if (!GraphicsEnvironment.isHeadless()) {
            SwingUtilities.invokeLater(() -> printFrame = new PrintFrame());
        } else {
            System.out.println("Running in headless mode, GUI components cannot be created.");
        }
    }

}
